<?php

/**
 * Description of easoftwarebussinesobject
 *
 * @author EADeveloper
 */
class easoftwarebussinesobject {

    public $sqlList = array();
    private static $me;
    public $errorMsg = "";

    public static function getMe($name = "easoftwarebussinesobject") {
        if (self::$me == null) {
            self::$me = new $name();
        }
        return self::$me;
    }

    public function execute($sql) {
        $db = DbManager::getMe();
        $r = $db->query($sql, true);
        if ($r == null) {
            throw new Exception($db->errorMsg);
        }
    }

    public function getArrayData($sql) {
        $db = DbManager::getMe();
        return $db->queryToArray($sql);
    }
}
?>
